# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>

# this package needs special care since it is a part of the toolchain.
# we need to be able to have the old version installed in parallel with
# a new with ABI breaking change. That is why we have the version
# as a part of the pkgname.

pkgname=isl25
pkgver=0.25
pkgrel=2
pkgdesc="An Integer Set Library for the Polyhedral Model"
url="http://isl.gforge.inria.fr/"
arch="all"
license="MIT"
depends_dev="gmp-dev"
makedepends_host="$depends_dev"
makedepends="$makedepends_host"
source="https://libisl.sourceforge.io/isl-$pkgver.tar.bz2"

builddir="$srcdir"/isl-$pkgver

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--with-sysroot=$CBUILDROOT
	make
}

check() {
	make check
}

package() {
	replaces="isl24" # they have the same soname
	make DESTDIR="$pkgdir" INSTALL="install -D" install
	# isl-dev is provided by isl26
	rm -rf "$pkgdir"/usr/include \
		"$pkgdir"/usr/lib/pkgconfig \
		"$pkgdir"/usr/lib/*.a \
		"$pkgdir"/usr/lib/*.so \
		"$pkgdir"/usr/lib/*.py
}

sha512sums="
d309388d7dc1c861fddf74dbcc0f15b0166b166d0ed694473445ec47eb7d3dfab96412554016b3e06292f01967441546783ab329829dc4df4b9813716e2ef9ed  isl-0.25.tar.bz2
"
